﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace poco
{
    public class URL
    {
        public enum URLType {work, home, blog, profile, other};

        protected string value;

        [JsonProperty(PropertyName = "value")]
        public string Value
        { 
            get {return value;}
            set
            {
                // TODO: confirm canonicalization rules
                this.value = value.ToLower();
            }
        }

        [JsonProperty(PropertyName = "type")]
        public URLType Type { get; set; }

        [JsonProperty(PropertyName = "primary")]
        public bool Primary { get; set; }

    }
}
